Repository navigation
fix(id): seed configured accounts into the serving world directory (#5119) - #8413
Merged
Merged
Conversation
…5119) Slice 3 persisted server-config provisioning into directory.jsonl beside the groups log, but a durable world loads .id-worlds/<name>/directory.jsonl (world_store::open_world), so the live world directory view treated configured keys as anonymous while startup reported them provisioned (PR #8356 review, P2). Extract Provisioned::apply_users from apply (behaviour-preserving) and seed the default world directory from the loaded config at serve startup via seed_world_directory; idempotent, so restarts create nothing. Ephemeral worlds hold no directory file and are unchanged. Regression test seed_world_directory_provisions_configured_accounts; serve suite 47/47 and server_config suite 57/57 pass locally (world feature).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #5119 (remainder). Queue task 14074. Fixes the unresolved P2 from PR #8356's review (discussion r4532341753).
Problem
Slice 3 (PR #8356) persisted server-config provisioning into
directory.jsonlbeside the groups log. But a durable world loads its directory from.id-worlds/<name>/directory.jsonl(world_store::open_world), and nothing ever passed the provisioned accounts into that directory. Serving a durable world with--server-configtherefore reported successful account provisioning at startup while the live world's directory view (directory_view.rs) treated the configured keys as anonymous.Fix
Provisioned::apply_usersis extracted fromProvisioned::apply(behaviour-preserving:applynow calls it first, then the group loop, with identical report semantics). This lets a directory that is not the provisioning home receive the same accounts without taking the group events, which belong to the groups log.cmd_serve, after the config load and fail-fast provisioning, seeds the default world's directory (the world serve opens at startup) via the newseed_world_directoryhelper whenever world serving is on and the serve is not ephemeral. Seeding is the same idempotent account application, so a restart creates nothing and reports nothing new.Tests
seed_world_directory_provisions_configured_accounts: seeds a temp world directory from a two-user config, reopens it the wayworld_store::open_worlddoes, asserts both accounts resolve, and asserts a second seed creates nothing.--no-default-features --features world, lib tests):commands::serve::tests::47/47 pass (incl. the slice-3 restart test and the pull-policy tests) andserver_config::57/57 pass. Full default-feature suite is CI's verdict.Deliberately not in this PR
The last #5119 remainder — wiring
ServerConfig::freshness()into a seitan admission check that serve runs — has no consumer to wire into yet:seitan::Invite::admittakes the window as a parameter and has no production caller, and no serving path receives a seitan proof today. That remainder is being explicitly re-scoped on #5119 (it needs a serving admission path designed first), rather than being silently dropped or stubbed here.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.